<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <!-- 对象 -->
    <!-- <script>
        let s = {
            name: "zhangsan",
            age: "20",
            sex: "男",
            say: function () {
                console.log("hello");
            }
        }

        console.log(s);//
        // age: "20"
        // name: "zhangsan"
        // sex: "男"
        s.name = "lisi";
        s['age'] = 100;
        console.log(s);
        console.log(s.name);
        console.log(s['age']);
        s.say();
    </script> -->
    <script>
        class Person {
            constructor(name, age, sex) {
                this.name = name;
                this.age = age;
                this.sex = sex;
            }
            static a ="a";
            say(){
                console.log("shab");

            }
            static run(){
                console.log("run");
            }
        
        }
        let person1 = new Person("zhanna",10,"男");
        console.log(person1)
        person1.say();
        Person.run();
        console.log(Person.a);
         // let student =new Object();
    // student.name="liosi"
    // student.height=175
    // student.weight=120
    // student.sayHello =function(){
    //     console.log("hello")

    // }
    // console.log(student.name)
    // console.log(student.height)
    // console.log(student['weight'])
    // student.sayHello();
    let student ={};
    student.name="liosi"
    student.height=175
    student.weight=120
    student.sayHello =function(){
        console.log( this.name+ "hello")

    }
    console.log(student.name)
    console.log(student.height)
    console.log(student['weight'])
    student.sayHello();
    </script>
</body>

</html>